/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pkl53.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author akhul
 */
@Entity
@Table(name = "b1_tempat")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "B1Tempat.findAll", query = "SELECT b FROM B1Tempat b"),
    @NamedQuery(name = "B1Tempat.findByKks", query = "SELECT b FROM B1Tempat b WHERE b.kks = :kks"),
    @NamedQuery(name = "B1Tempat.findByB1r1", query = "SELECT b FROM B1Tempat b WHERE b.b1r1 = :b1r1"),
    @NamedQuery(name = "B1Tempat.findByB1r2", query = "SELECT b FROM B1Tempat b WHERE b.b1r2 = :b1r2"),
    @NamedQuery(name = "B1Tempat.findByB1r3", query = "SELECT b FROM B1Tempat b WHERE b.b1r3 = :b1r3"),
    @NamedQuery(name = "B1Tempat.findByB1r4", query = "SELECT b FROM B1Tempat b WHERE b.b1r4 = :b1r4"),
    @NamedQuery(name = "B1Tempat.findByB1r5", query = "SELECT b FROM B1Tempat b WHERE b.b1r5 = :b1r5"),
    @NamedQuery(name = "B1Tempat.findByB1r6", query = "SELECT b FROM B1Tempat b WHERE b.b1r6 = :b1r6"),
    @NamedQuery(name = "B1Tempat.findByB1r7", query = "SELECT b FROM B1Tempat b WHERE b.b1r7 = :b1r7"),
    @NamedQuery(name = "B1Tempat.findByB1r8", query = "SELECT b FROM B1Tempat b WHERE b.b1r8 = :b1r8"),
    @NamedQuery(name = "B1Tempat.findByTglPencacahan", query = "SELECT b FROM B1Tempat b WHERE b.tglPencacahan = :tglPencacahan"),
    @NamedQuery(name = "B1Tempat.findByTglPemeriksaan", query = "SELECT b FROM B1Tempat b WHERE b.tglPemeriksaan = :tglPemeriksaan")})
public class Blok1TempatModel implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "KKS")
    private String kks;
    @Basic(optional = false)
    @Column(name = "B1R1")
    private String b1r1;
    @Basic(optional = false)
    @Column(name = "B1R2")
    private String b1r2;
    @Basic(optional = false)
    @Column(name = "B1R3")
    private String b1r3;
    @Basic(optional = false)
    @Column(name = "B1R4")
    private int b1r4;
    @Basic(optional = false)
    @Column(name = "B1R5")
    private String b1r5;
    @Basic(optional = false)
    @Column(name = "B1R6")
    private String b1r6;
    @Basic(optional = false)
    @Column(name = "B1R7")
    private String b1r7;
    @Basic(optional = false)
    @Column(name = "B1R8")
    private String b1r8;
    @Basic(optional = false)
    @Column(name = "tgl_pencacahan")
    @Temporal(TemporalType.DATE)
    private Date tglPencacahan;
    @Column(name = "tgl pemeriksaan")
    @Temporal(TemporalType.DATE)
    private Date tglPemeriksaan;
    @JoinColumn(name = "nim_pencacah", referencedColumnName = "NIM")
    @ManyToOne(optional = false)
    private Mahasiswa nimPencacah;
    private Blok1TempatModel instance;
    
    public Blok1TempatModel() {
    }

    public Blok1TempatModel(String kks) {
        this.kks = kks;
    }

    public Blok1TempatModel(String kks, String b1r1, String b1r2, String b1r3, int b1r4, String b1r5, String b1r6, String b1r7, String b1r8, Date tglPencacahan) {
        this.kks = kks;
        this.b1r1 = b1r1;
        this.b1r2 = b1r2;
        this.b1r3 = b1r3;
        this.b1r4 = b1r4;
        this.b1r5 = b1r5;
        this.b1r6 = b1r6;
        this.b1r7 = b1r7;
        this.b1r8 = b1r8;
        this.tglPencacahan = tglPencacahan;
    }

    public String getKks() {
        return kks;
    }

    public void setKks(String kks) {
        this.kks = kks;
    }

    public String getB1r1() {
        return b1r1;
    }

    public void setB1r1(String b1r1) {
        this.b1r1 = b1r1;
    }

    public String getB1r2() {
        return b1r2;
    }

    public void setB1r2(String b1r2) {
        this.b1r2 = b1r2;
    }

    public String getB1r3() {
        return b1r3;
    }

    public void setB1r3(String b1r3) {
        this.b1r3 = b1r3;
    }

    public int getB1r4() {
        return b1r4;
    }

    public void setB1r4(int b1r4) {
        this.b1r4 = b1r4;
    }

    public String getB1r5() {
        return b1r5;
    }

    public void setB1r5(String b1r5) {
        this.b1r5 = b1r5;
    }

    public String getB1r6() {
        return b1r6;
    }

    public void setB1r6(String b1r6) {
        this.b1r6 = b1r6;
    }

    public String getB1r7() {
        return b1r7;
    }

    public void setB1r7(String b1r7) {
        this.b1r7 = b1r7;
    }

    public String getB1r8() {
        return b1r8;
    }

    public void setB1r8(String b1r8) {
        this.b1r8 = b1r8;
    }

    public Date getTglPencacahan() {
        return tglPencacahan;
    }

    public void setTglPencacahan(Date tglPencacahan) {
        this.tglPencacahan = tglPencacahan;
    }

    public Date getTglPemeriksaan() {
        return tglPemeriksaan;
    }

    public void setTglPemeriksaan(Date tglPemeriksaan) {
        this.tglPemeriksaan = tglPemeriksaan;
    }

    public Mahasiswa getNimPencacah() {
        return nimPencacah;
    }

    public void setNimPencacah(Mahasiswa nimPencacah) {
        this.nimPencacah = nimPencacah;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (kks != null ? kks.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Blok1TempatModel)) {
            return false;
        }
        Blok1TempatModel other = (Blok1TempatModel) object;
        if ((this.kks == null && other.kks != null) || (this.kks != null && !this.kks.equals(other.kks))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pkl53.model.B1Tempat[ kks=" + kks + " ]";
    }

    /**
     * @return the instance
     */
    public Blok1TempatModel getInstance() {
        return instance;
    }
    
}
